package com.joinway.mobile.bean.form

import javax.validation.constraints.Min

import org.hibernate.validator.constraints.NotBlank
import org.hibernate.validator.constraints.NotEmpty
import org.jsondoc.core.annotation.ApiObject
import org.jsondoc.core.annotation.ApiObjectField

import com.joinway.framework.bean.BaseBean

@ApiObject(name = "OrderForm", description = "客户端订单信息")
class OrderForm extends BaseBean {
	@ApiObjectField(description="用户id") @Min(1l) int userId
	@ApiObjectField(description="支付宝订单号") @NotBlank String orderId
	@ApiObjectField(description="邮寄地址") @NotBlank String address
	@ApiObjectField(description="邮政编码") @NotBlank String zip
	@ApiObjectField(description="电话号") @NotBlank String tel
	@ApiObjectField(description="收件人") @NotBlank String consignee
	@ApiObjectField(description="客户端购物车信息") @NotEmpty List<ShopCart> carts
}
